home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 123
/
(Vol 123) Jan 13 2011.iso
/
Games
/
go-fishing.swf
/
scripts
/
DefineSprite_221
/
frame_15
/
DoAction.as
Wrap
Text File
|
2011-01-13
|
780b
|
36 lines
fishhook_y = getProperty("/ship/fishhook", _Y);
fish_x = getProperty(my_name, _X);
fish_y = getProperty(my_name, _Y);
delta_x = eval("/:fishhook_x") - fish_x;
delta_y = fishhook_y - fish_y;
if(eval("/:hit") == "1")
{
if((fishhook_width + fish_width) * (fishhook_width + fish_width) >= delta_x * delta_x + delta_y * delta_y)
{
gotoAndPlay(24);
set("/:hit","0");
set("/:movie_enable","0");
l = "0";
}
}
if(fish_x < "0")
{
gotoAndStop(1);
set("/:count","/:count - 1");
set("/:a3","0");
setProperty(my_name, _X, former_x);
setProperty(my_name, _Y, former_y);
}
else
{
setProperty(my_name, _X, fish_x - speed);
}
if(turn_o == "3")
{
turn = random("30");
}
if(turn == "19")
{
gotoAndPlay(5);
}